<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\SummaryReportAsset;
SummaryReportAsset::register($this);
$this->title = '汇总报表 -- Sacrebleu DSP';
?>
<div class="col-sm-6">
  <ol class="breadcrumb">
   	<li>运营管理</li>
    <li>汇总报表</li>
    <li class="active">数据</li>
  </ol>
</div>
</div>
<div class="row">
	<h3 class="page-title">
    <i class="fa fa-retweet"></i>
    汇总报表
    <small></small>
  </h3>
</div>
<div class="panel">
	<div class="panel-body">
    <div class="panel panel-dotted">
      <div class="panel-heading">
        <h4>
          <i class="fa fa-filter"></i>
          筛选条件
        </h4>
      </div>
      <div class="panel-body">
        <form class="form-horizontal" id="filter-frm" method="POST" action="#" role="form">
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_advertiser" class="col-sm-4 control-label"> 广告主选择：</label>
                <div class="col-sm-8">
                  <select class="form-control data-filter" id="filter_advertiser" name="advertiser" placeholder="选择广告主">
                    <option value="all">全部</option>
                    <option value="1">Advertiser1</option>
                    <option value="2">Advertiser2</option>
                    <option value="3">Advertiser3</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_market" class="col-sm-4 control-label">选择市场：</label>
                <div class="col-sm-8">
                  <select class="form-control" id="filter_market" name="market" >
                    <option value="all">全部</option>
                    <option value="vamaker">vamaker</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_campaign" class="col-sm-4 control-label">选择活动：</label>
                <div class="col-sm-8">
                  <select class="form-control" id="filter_campaign" name="campaign" >
                    <option value="all">全部</option>
                    <option value="vamaker">Campaign-01</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_launch" class="col-sm-4 control-label">选择投放：</label>
                <div class="col-sm-8">
                  <select class="form-control" id="filter_launch" name="launch" >
                    <option value="all">全部</option>
                    <option value="vamaker">Launch-01</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_strategy" class="col-sm-4 control-label">选择策略：</label>
                <div class="col-sm-8">
                  <select class="form-control" id="filter_strategy" name="strategy" >
                    <option value="all">全部</option>
                    <option value="vamaker">Strategy-01</option>
                  </select>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_date" class="col-sm-4 control-label"> 时间选择：</label>
                <div class="col-sm-8">
                  <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-default" id="range-date-btn" type="button"><i class="fa fa-calendar"></i></button>
                  </span>
                  <input type="text" class="form-control" id="range-date" name="range_date" value="" placeholder="点击左侧按钮选择时间范围，格式为YYYY-MM-DD - YYYY-MM-DD" title="点击左侧按钮选择时间范围，格式为YYYY-MM-DD - YYYY-MM-DD" readonly>
                </div>
                </div>
              </div>
            </div>
            <!-- <div class="col-sm-4">
              <div class="form-group">
                <label for="" class="col-sm-4 control-label">快速设置：</label>
                <div class="col-sm-8">
                  
                </div>
              </div>
            </div> -->
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <div class="col-sm-8 col-sm-offset-4">
                  <button class="btn btn-success" type="submit" data-loading-text="<i class='fa fa-spinner fa-spin'></i> 查询中..."><i class="fa fa-search"></i> 查询</button>
                </div>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
    <div class="panel panel-dotted">
      <div class="panel-heading">
        <h4><i class="fa fa-pie-chart"></i> 数据趋势</h4>
      </div>
      <div class="panel-body">
        <div class="row">
          <div class="col-sm-12">
            <!-- <div class="chart-filter" style="margin-bottom: 10px; overflow:hidden;">
              <div id="total-date-op" class="chart-date-op pull-right">
                <div data-toggle="buttons" class="btn-group">
                  <label class="btn btn-default btn-sm active">
                    <input type="radio" checked="" value="day" name="date-options">按日</label>
                  <label class="btn btn-default btn-sm">
                    <input type="radio" value="week" name="date-options">按周</label>
                  <label class="btn btn-default btn-sm">
                    <input type="radio" value="month" name="date-options">按月</label>
                </div>
              </div>
            </div> -->
            <div class="chart-holder" id="summary-report-data"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="panel panel-dotted">
      <div class="panel-heading">
        <h4><i class="fa fa-table"></i> 数据列表</h4>
      </div>
      <div class="panel-body">
        <div class="row">
          <div class="col-sm-12">     
            <div class="table-responsive">
              <table class="table table-hover" id="data-table">
                <thead>
                  <tr>
                    <th>ID</th>
                    <!-- <th>媒体</th> -->
                    <th>市场</th>
                    <th>广告主</th>
                    <th>花费</th>
                    <th>展现数</th>
                    <th>点击数</th>
                    <th>点击率</th>
                    <th>CPM</th>
                    <th>CPC</th>
                    <!-- <th>转化率</th>
                    <th>转化金额</th> -->
                  </tr>
                </thead>
                <tbody></tbody>
              </table>
              <table class="table table-condensed table-total">
                <tbody>
                  <tr class="total-title">
                    <td colspan="2" rowspan="2">
                      <strong>总计</strong>
                    </td>
                    <td>花费</td>
                    <td>展现数</td>
                    <td>点击数</td>
                    <td>点击率</td>
                    <td>CPM</td>
                    <td>CPC</td>
                    <!-- <td>转化率</td>
                    <td>转化金额</td> -->
                  </tr>
                  <tr class="total-data">
                    <td>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0.00</p>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0.00</p>
                    </td>
                    <td>0</td>
                    <td>0</td>
                    <td>0.00 %</td>
                    <td>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0</p>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0</p>
                    </td>
                    <td>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0</p>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0</p>
                    </td>
                    <!-- <td>0</td>
                    <td>0</td> -->
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
	</div>
</div>
<?php
  $dataUrl = Yii::getAlias('@web').'/response/summaryReport/summaryReportDataList.php';
  $this->registerJs("SL.setVar('SUMMARY_REPORT_DATA_LIST','$dataUrl');", View::POS_END);
  $this->registerJsFile('@web/js/summaryReport/sl.summaryReportList.js', ['depends' => 'app\assets\SummaryReportAsset']);
?>